package org.ingeniart.siec.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the matricula_requerimiento database table.
 * 
 */
@Embeddable
public class MatriculaRequerimientoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="codigo_matricula")
	private Integer codigoMatricula;

	@Column(name="id_requerimiento")
	private Integer idRequerimiento;

    public MatriculaRequerimientoPK() {
    }
	public Integer getCodigoMatricula() {
		return this.codigoMatricula;
	}
	public void setCodigoMatricula(Integer codigoMatricula) {
		this.codigoMatricula = codigoMatricula;
	}
	public Integer getIdRequerimiento() {
		return this.idRequerimiento;
	}
	public void setIdRequerimiento(Integer idRequerimiento) {
		this.idRequerimiento = idRequerimiento;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof MatriculaRequerimientoPK)) {
			return false;
		}
		MatriculaRequerimientoPK castOther = (MatriculaRequerimientoPK)other;
		return 
			this.codigoMatricula.equals(castOther.codigoMatricula)
			&& this.idRequerimiento.equals(castOther.idRequerimiento);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.codigoMatricula.hashCode();
		hash = hash * prime + this.idRequerimiento.hashCode();
		
		return hash;
    }
}